<template>\
  <!-- 国际化配置 -->\
</template>

<script>
import { ref, reactive } from 'vue'

const currentLang = ref('zh')

const translations = reactive({
  zh: {\
    // 导航
    home: '首页',\
    products: '产品',
    aiAssistant: 'AI助手',
    contact: '联系我们',
    backToHome: '返回首页',
    
    // 首页
    heroTitle: '专业电器设备解决方案',
    heroSubtitle: '为您提供最先进的电器设备，结合AI智能推荐，打造完美的用户体验',
    exploreProducts: '探索产品',
    featuredProducts: '精选产品',
    
    // 产品
    smartHomeSystem: '智能家居系统',
    smartHomeDesc: '全套智能家居解决方案，让您的生活更加便捷舒适',
    industrialAutomation: '工业自动化设备',
    industrialDesc: '高效可靠的工业自动化解决方案，提升生产效率',
    medicalElectronics: '医疗电子设备',
    medicalDesc: '精密医疗电子设备，为健康保驾护航',
    securitySystem: '安防监控系统',
    securityDesc: '先进的安防监控解决方案，保障您的安全',
    
    // AI助手
    aiSmartAssistant: 'AI智能助手',
    aiDescription: '基于DeepSeek AI技术，为您提供专业的产品咨询和推荐服务',
    enterQuestion: '请输入您的问题...',
    askAI: '咨询AI',
    
    // 联系信息
    contactInfo: '联系信息',
    productCategories: '产品分类',
    support: '服务支持',
    allRightsReserved: '版权所有',
    
    // 按钮
    buyNow: '立即购买',
    scheduleDemo: '预约演示',
    technicalConsultation: '技术咨询',
    getQuote: '获取报价',
    freeConsultation: '免费咨询'
  },
  en: {
    // Navigation
    home: 'Home',
    products: 'Products',
    aiAssistant: 'AI Assistant',
    contact: 'Contact',
    backToHome: 'Back to Home',
    
    // Home
    heroTitle: 'Professional Electronics Solutions',
    heroSubtitle: 'Providing cutting-edge electronics with AI-powered recommendations for the perfect user experience',
    exploreProducts: 'Explore Products',
    featuredProducts: 'Featured Products',
    
    // Products
    smartHomeSystem: 'Smart Home System',
    smartHomeDesc: \'Complete smart home solution for convenient and comfortable living',
    industrialAutomation: 'Industrial Automation',
    industrialDesc: 'Efficient and reliable industrial automation solutions to boost productivity',
    medicalElectronics: 'Medical Electronics',
    medicalDesc: 'Precision medical electronics for health protection',
    securitySystem: 'Security System',
    securityDesc: 'Advanced security monitoring solutions for your safety',
    
    // AI Assistant
    aiSmartAssistant: 'AI Smart Assistant',
    aiDescription: 'Powered by DeepSeek AI technology, providing professional product consultation and recommendations',
    enterQuestion: 'Enter your question...',
    askAI: 'Ask AI',
    
    // Contact
    contactInfo: 'Contact Info',
    productCategories: 'Product Categories',
    support: 'Support',
    allRightsReserved: 'All rights reserved',
    
    // Buttons
    buyNow: 'Buy Now',
    scheduleDemo: 'Schedule Demo',
    technicalConsultation: 'Technical Consultation',
    getQuote: 'Get Quote',
    freeConsultation: 'Free Consultation'
  }
})

export function useI18n() {
  const t = (key) => {
    return translations[currentLang.value][key] || key
  }
  
  const toggleLanguage = () => {
    currentLang.value = currentLang.value === 'zh' ? 'en' : 'zh'
  }
  
  const getCurrentLang = () => currentLang.value
  
  return {
    t,
    toggleLanguage,
    getCurrentLang,
    currentLang
  }
}\
</script>
